package com.zlzxm.lock;

import android.graphics.Color;
import android.os.Build;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import androidx.appcompat.app.AppCompatActivity;

/**
 * Created by zlz
 * on  2019-10-14
 */
public class BaseActivity extends AppCompatActivity {


    protected void setTransparent(){

        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP){

            Window window = getWindow();

            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
            window.getDecorView().setSystemUiVisibility(
                    View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN|
                            View.SYSTEM_UI_FLAG_LAYOUT_STABLE);

            window.setStatusBarColor(Color.TRANSPARENT);

        }

    }


}
